/**
 * This class details the constants and behavior of a 
 * missile in this game.  A missile can be fired by the 
 * player's ship or the enemy ships.  
 */

package com.PortalAsteroidjava;

import com.badlogic.gdx.graphics.*;
import com.badlogic.gdx.graphics.g2d.*;
public class Missile extends Sprite{
	
	//The size of a missile sprite
	public static final int SIZE = 5;
	
	/**
	 * Creates a missile at the given position with
	 * the given velocity.
	 */
	
	public Missile(float x, float y, double velX, double velY)
	{
		super(PortalAsteroidjava.missileTexture,SIZE, SIZE);
		
		this.setPosition(x, y);
	}
	
	/**
	 * Destroys the missile if it leaves the bounds of the play
	 * area.  
	 * NOTE: This code will be uncommented once the main game loop
	 * is completed and has a removeSprite method.
	 */
	
	/*public void outOfBounds(int x1, int y1, int x2, int y2)
	{
		if (this.position.x < x1)
		{
			Game.removeMissile(this);
		}
		else if (this.position.x >= x2)
		{
			Game.removeMissile(this);
		}
		
		if (this.position.y < y1)
		{
			Game.removeMissile(this);
		}
		else if (this.position.y >= y2)
		{
			Game.removeMissile(this);
		}
	}*/
	
	/**
	 * Updates the position of the missile.
	 */
	/*public void tick()
	{
		super.tick();
	}*/
}
